/**
 * 
 */
package com.ndm.common;

import android.R;

/**
 * @author gundals
 *
 */
public class KoImage implements Image {

	private static Image instance;
	
	private int image[] = {
			R.drawable.btn_default
	};
	
	/**
	 * 싱글톤
	 * @return
	 */
	public static Image getInstance()
	{
	  if (instance == null)
	  {
	    synchronized(KoImage.class) {      //1
	    	Image inst = instance;         //2
	      if (inst == null)
	      {
	        synchronized(KoImage.class) {  //3
	          instance = new KoImage();               
	        }
	      }
	    }
	  }
	  return instance;
	}
	
	/**
	 * 
	 * @param index
	 * @return
	 */
	public int getImage(int index){
		return image[index];
	}
}
